//
//  TMGDetailTableViewCell.m
//  TMGold
//
//  Created by Mac on 2018/3/28.
//  Copyright © 2018年 tangmu. All rights reserved.
//

#import "TMGDetailTableViewCell.h"

@interface  TMGDetailTableViewCell()

@end
@implementation TMGDetailTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 44;
}
#pragma mark --subView
- (void)configSubView{
    self.leftLable = [[STLabel alloc] initWithFrame:CGRectMake(15, 0, 120, 44)
                                                     text:@""
                                                textColor:TM_secendTextColor
                                                     font:14
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.leftLable];
    
    
    self.rightLable = [[STLabel alloc] initWithFrame:CGRectMake(self.leftLable.right, 0, UIScreenWidth - 15 - self.leftLable.right, 44)
                                               text:@""
                                          textColor:TM_firstTextColor
                                               font:13
                                        isSizetoFit:NO
                                      textAlignment:NSTextAlignmentLeft];
    [self addSubview:self.rightLable];

}
- (void)setModel:(STTableEasyModel *)model{
    self.leftLable.text = model.textString;
    self.rightLable.text = model.detailString;
    [NSString lableAutoAdjustheightWithLabel:self.rightLable];
    
    self.leftLable.centerY = model.height / 2;
    self.rightLable.centerY = model.height / 2;
}
@end
